<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>html+css部分复习-cnblog | 凌歆的博客</title>
    <meta name="generator" content="VuePress 1.9.5">
    <link rel="icon" href="/img/favicon.ico">
    <meta name="description" content="web前端技术博客,专注web前端学习与总结。JavaScript,js,ES6,TypeScript,vue,React,python,css3,html5,Node,git,github等技术文章。">
    <meta name="keywords" content="前端博客,个人技术博客,前端,前端开发,前端框架,web前端,前端面试题,技术文档,学习,面试,JavaScript,js,ES6,TypeScript,vue,python,css3,html5,Node,git,github,markdown">
    <meta name="baidu-site-verification" content="7F55weZDDc">
    <meta name="theme-color" content="#11a8cd">
    
    <link rel="preload" href="/assets/css/0.styles.d9c8cf8c.css" as="style"><link rel="preload" href="/assets/js/app.57550e13.js" as="script"><link rel="preload" href="/assets/js/2.f014c35f.js" as="script"><link rel="preload" href="/assets/js/124.60df855c.js" as="script"><link rel="prefetch" href="/assets/js/10.03a98811.js"><link rel="prefetch" href="/assets/js/100.145e708e.js"><link rel="prefetch" href="/assets/js/101.098ca5c8.js"><link rel="prefetch" href="/assets/js/102.4d45c69a.js"><link rel="prefetch" href="/assets/js/103.499de505.js"><link rel="prefetch" href="/assets/js/104.c2c1b9b6.js"><link rel="prefetch" href="/assets/js/105.4e9b0663.js"><link rel="prefetch" href="/assets/js/106.9bb8cf6f.js"><link rel="prefetch" href="/assets/js/107.a81b32d7.js"><link rel="prefetch" href="/assets/js/108.81511e67.js"><link rel="prefetch" href="/assets/js/109.6a6741bf.js"><link rel="prefetch" href="/assets/js/11.e8729182.js"><link rel="prefetch" href="/assets/js/110.de657fe7.js"><link rel="prefetch" href="/assets/js/111.b092af6d.js"><link rel="prefetch" href="/assets/js/112.2dca5709.js"><link rel="prefetch" href="/assets/js/113.dbed1fac.js"><link rel="prefetch" href="/assets/js/114.e95a0131.js"><link rel="prefetch" href="/assets/js/115.2e3e8285.js"><link rel="prefetch" href="/assets/js/116.e64f7fec.js"><link rel="prefetch" href="/assets/js/117.583552c9.js"><link rel="prefetch" href="/assets/js/118.aa5d18f0.js"><link rel="prefetch" href="/assets/js/119.0c7b52d7.js"><link rel="prefetch" href="/assets/js/12.d63acec2.js"><link rel="prefetch" href="/assets/js/120.13f86281.js"><link rel="prefetch" href="/assets/js/121.e2b5b7f9.js"><link rel="prefetch" href="/assets/js/122.5252216a.js"><link rel="prefetch" href="/assets/js/123.8b8a3503.js"><link rel="prefetch" href="/assets/js/125.f073ab1c.js"><link rel="prefetch" href="/assets/js/126.7b73de6a.js"><link rel="prefetch" href="/assets/js/127.4e25971c.js"><link rel="prefetch" href="/assets/js/128.0edf0e06.js"><link rel="prefetch" href="/assets/js/129.5cb5a70a.js"><link rel="prefetch" href="/assets/js/13.2259ef71.js"><link rel="prefetch" href="/assets/js/130.00247fda.js"><link rel="prefetch" href="/assets/js/131.d6fc003a.js"><link rel="prefetch" href="/assets/js/132.1a32b18f.js"><link rel="prefetch" href="/assets/js/133.e46c0193.js"><link rel="prefetch" href="/assets/js/134.a6ad681f.js"><link rel="prefetch" href="/assets/js/135.2fcbe137.js"><link rel="prefetch" href="/assets/js/136.f69bf451.js"><link rel="prefetch" href="/assets/js/137.b9ef2fcc.js"><link rel="prefetch" href="/assets/js/138.7fdd9feb.js"><link rel="prefetch" href="/assets/js/139.a3a37c91.js"><link rel="prefetch" href="/assets/js/14.0d6b23b9.js"><link rel="prefetch" href="/assets/js/140.a7c013ae.js"><link rel="prefetch" href="/assets/js/141.956c36ce.js"><link rel="prefetch" href="/assets/js/142.5aacfe42.js"><link rel="prefetch" href="/assets/js/143.57d691ef.js"><link rel="prefetch" href="/assets/js/144.b1e5766e.js"><link rel="prefetch" href="/assets/js/145.463284b7.js"><link rel="prefetch" href="/assets/js/146.6cc6420c.js"><link rel="prefetch" href="/assets/js/147.5b78c5a2.js"><link rel="prefetch" href="/assets/js/148.8d1d7679.js"><link rel="prefetch" href="/assets/js/149.4e0eb213.js"><link rel="prefetch" href="/assets/js/15.f6fde69d.js"><link rel="prefetch" href="/assets/js/150.b183de37.js"><link rel="prefetch" href="/assets/js/151.729ae770.js"><link rel="prefetch" href="/assets/js/152.b1297018.js"><link rel="prefetch" href="/assets/js/153.bb991bca.js"><link rel="prefetch" href="/assets/js/154.6f2286aa.js"><link rel="prefetch" href="/assets/js/155.6a9c7e4d.js"><link rel="prefetch" href="/assets/js/156.f7bd535d.js"><link rel="prefetch" href="/assets/js/157.64c0065c.js"><link rel="prefetch" href="/assets/js/158.d31ae949.js"><link rel="prefetch" href="/assets/js/159.7daea8a7.js"><link rel="prefetch" href="/assets/js/16.7be21beb.js"><link rel="prefetch" href="/assets/js/160.33cc971a.js"><link rel="prefetch" href="/assets/js/161.1676442a.js"><link rel="prefetch" href="/assets/js/162.71378046.js"><link rel="prefetch" href="/assets/js/163.99e49959.js"><link rel="prefetch" href="/assets/js/164.306f07d2.js"><link rel="prefetch" href="/assets/js/165.170977c7.js"><link rel="prefetch" href="/assets/js/166.f8602525.js"><link rel="prefetch" href="/assets/js/167.eea5c001.js"><link rel="prefetch" href="/assets/js/168.0146a311.js"><link rel="prefetch" href="/assets/js/169.05f9c9d9.js"><link rel="prefetch" href="/assets/js/17.2543f471.js"><link rel="prefetch" href="/assets/js/170.25d602b2.js"><link rel="prefetch" href="/assets/js/171.1ada26a6.js"><link rel="prefetch" href="/assets/js/172.2a0f697c.js"><link rel="prefetch" href="/assets/js/173.230d8ca8.js"><link rel="prefetch" href="/assets/js/174.e3758a2b.js"><link rel="prefetch" href="/assets/js/175.0f19f8ea.js"><link rel="prefetch" href="/assets/js/176.bf70d37d.js"><link rel="prefetch" href="/assets/js/177.4400f272.js"><link rel="prefetch" href="/assets/js/178.85af7b89.js"><link rel="prefetch" href="/assets/js/179.4cfaaaa2.js"><link rel="prefetch" href="/assets/js/18.394415f8.js"><link rel="prefetch" href="/assets/js/180.449c8409.js"><link rel="prefetch" href="/assets/js/181.73276924.js"><link rel="prefetch" href="/assets/js/182.5fab25cc.js"><link rel="prefetch" href="/assets/js/183.ecd4934d.js"><link rel="prefetch" href="/assets/js/184.246092cf.js"><link rel="prefetch" href="/assets/js/185.c671cd86.js"><link rel="prefetch" href="/assets/js/186.49bd1963.js"><link rel="prefetch" href="/assets/js/187.1fb32764.js"><link rel="prefetch" href="/assets/js/188.7c6885e9.js"><link rel="prefetch" href="/assets/js/189.a8701dec.js"><link rel="prefetch" href="/assets/js/19.ca7db8ea.js"><link rel="prefetch" href="/assets/js/190.ae3d3bde.js"><link rel="prefetch" href="/assets/js/191.ad7cd44e.js"><link rel="prefetch" href="/assets/js/192.bc443842.js"><link rel="prefetch" href="/assets/js/193.e4755764.js"><link rel="prefetch" href="/assets/js/194.814112ce.js"><link rel="prefetch" href="/assets/js/195.1c0aaa80.js"><link rel="prefetch" href="/assets/js/196.a6bd7add.js"><link rel="prefetch" href="/assets/js/20.4e91cd31.js"><link rel="prefetch" href="/assets/js/21.f095e6e1.js"><link rel="prefetch" href="/assets/js/22.72f4b8ab.js"><link rel="prefetch" href="/assets/js/23.e94eb9d2.js"><link rel="prefetch" href="/assets/js/24.0eae7d6f.js"><link rel="prefetch" href="/assets/js/25.36157609.js"><link rel="prefetch" href="/assets/js/26.dc5b6cba.js"><link rel="prefetch" href="/assets/js/27.c19b7b63.js"><link rel="prefetch" href="/assets/js/28.3aceae59.js"><link rel="prefetch" href="/assets/js/29.536091b3.js"><link rel="prefetch" href="/assets/js/3.d11119c4.js"><link rel="prefetch" href="/assets/js/30.821a4a30.js"><link rel="prefetch" href="/assets/js/31.5238784c.js"><link rel="prefetch" href="/assets/js/32.10bc7179.js"><link rel="prefetch" href="/assets/js/33.c1ed69c9.js"><link rel="prefetch" href="/assets/js/34.8d384231.js"><link rel="prefetch" href="/assets/js/35.d8890e52.js"><link rel="prefetch" href="/assets/js/36.eca37ad5.js"><link rel="prefetch" href="/assets/js/37.802549e3.js"><link rel="prefetch" href="/assets/js/38.53841770.js"><link rel="prefetch" href="/assets/js/39.7ae44409.js"><link rel="prefetch" href="/assets/js/4.493b9bca.js"><link rel="prefetch" href="/assets/js/40.ce56364a.js"><link rel="prefetch" href="/assets/js/41.85f0114b.js"><link rel="prefetch" href="/assets/js/42.714da6e2.js"><link rel="prefetch" href="/assets/js/43.fee4437c.js"><link rel="prefetch" href="/assets/js/44.b039b68b.js"><link rel="prefetch" href="/assets/js/45.96a55605.js"><link rel="prefetch" href="/assets/js/46.956ffb03.js"><link rel="prefetch" href="/assets/js/47.147d9218.js"><link rel="prefetch" href="/assets/js/48.ff787b40.js"><link rel="prefetch" href="/assets/js/49.871eee87.js"><link rel="prefetch" href="/assets/js/5.e0ba07d7.js"><link rel="prefetch" href="/assets/js/50.99b7c29e.js"><link rel="prefetch" href="/assets/js/51.8ecbf4ba.js"><link rel="prefetch" href="/assets/js/52.53d91d7e.js"><link rel="prefetch" href="/assets/js/53.af8a0d2a.js"><link rel="prefetch" href="/assets/js/54.a2f848b5.js"><link rel="prefetch" href="/assets/js/55.267e9947.js"><link rel="prefetch" href="/assets/js/56.0b201c40.js"><link rel="prefetch" href="/assets/js/57.cbdfd6f7.js"><link rel="prefetch" href="/assets/js/58.636c0c3f.js"><link rel="prefetch" href="/assets/js/59.fc9216c4.js"><link rel="prefetch" href="/assets/js/6.b98373f2.js"><link rel="prefetch" href="/assets/js/60.34f16fc4.js"><link rel="prefetch" href="/assets/js/61.4d130bd8.js"><link rel="prefetch" href="/assets/js/62.927caa10.js"><link rel="prefetch" href="/assets/js/63.a451fee0.js"><link rel="prefetch" href="/assets/js/64.32a5d47b.js"><link rel="prefetch" href="/assets/js/65.bc099429.js"><link rel="prefetch" href="/assets/js/66.3953050d.js"><link rel="prefetch" href="/assets/js/67.e934823b.js"><link rel="prefetch" href="/assets/js/68.4bcb52b0.js"><link rel="prefetch" href="/assets/js/69.bede18c8.js"><link rel="prefetch" href="/assets/js/7.8de8df2d.js"><link rel="prefetch" href="/assets/js/70.fce1daac.js"><link rel="prefetch" href="/assets/js/71.ea0a8c5d.js"><link rel="prefetch" href="/assets/js/72.15382c9e.js"><link rel="prefetch" href="/assets/js/73.848364d3.js"><link rel="prefetch" href="/assets/js/74.5fd08a50.js"><link rel="prefetch" href="/assets/js/75.c937c70d.js"><link rel="prefetch" href="/assets/js/76.a0dacd5a.js"><link rel="prefetch" href="/assets/js/77.4019cc23.js"><link rel="prefetch" href="/assets/js/78.9676a9e1.js"><link rel="prefetch" href="/assets/js/79.e46e10d5.js"><link rel="prefetch" href="/assets/js/8.2098eb96.js"><link rel="prefetch" href="/assets/js/80.987e83cb.js"><link rel="prefetch" href="/assets/js/81.eb98ff36.js"><link rel="prefetch" href="/assets/js/82.623561a7.js"><link rel="prefetch" href="/assets/js/83.e256d909.js"><link rel="prefetch" href="/assets/js/84.7d06a550.js"><link rel="prefetch" href="/assets/js/85.b8d9879e.js"><link rel="prefetch" href="/assets/js/86.31c4581b.js"><link rel="prefetch" href="/assets/js/87.e06ee05e.js"><link rel="prefetch" href="/assets/js/88.81ef718d.js"><link rel="prefetch" href="/assets/js/89.ba237d2f.js"><link rel="prefetch" href="/assets/js/9.36092fd0.js"><link rel="prefetch" href="/assets/js/90.ad2c9d92.js"><link rel="prefetch" href="/assets/js/91.a661f52d.js"><link rel="prefetch" href="/assets/js/92.1c28035b.js"><link rel="prefetch" href="/assets/js/93.c8b8e3d6.js"><link rel="prefetch" href="/assets/js/94.b6bc4a44.js"><link rel="prefetch" href="/assets/js/95.92cea882.js"><link rel="prefetch" href="/assets/js/96.5373491b.js"><link rel="prefetch" href="/assets/js/97.bb39efc8.js"><link rel="prefetch" href="/assets/js/98.af7a030f.js"><link rel="prefetch" href="/assets/js/99.07dc87d8.js">
    <link rel="stylesheet" href="/assets/css/0.styles.d9c8cf8c.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="https://lingxin-tanhua.oss-cn-shanghai.aliyuncs.com/QQ%E6%88%AA%E5%9B%BE20220503092755.png" alt="凌歆的博客" class="logo"> <span class="site-name can-hide">凌歆的博客</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端" class="dropdown-title"><a href="/web/" class="link-title">前端</a> <span class="title" style="display:none;">前端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>学习笔记</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/note/html/" class="nav-link">HTML笔记</a></li><li class="dropdown-subitem"><a href="/note/js-low/" class="nav-link">JavaScript基础笔记</a></li><li class="dropdown-subitem"><a href="/note/js-high/" class="nav-link">JavaScript高阶笔记</a></li><li class="dropdown-subitem"><a href="/note/js-dom-bom/" class="nav-link">JavaScript DOM和BOM笔记</a></li><li class="dropdown-subitem"><a href="/note/jquery/" class="nav-link">jQuery笔记</a></li><li class="dropdown-subitem"><a href="/note/ajax/" class="nav-link">Ajax笔记</a></li><li class="dropdown-subitem"><a href="/note/nodejs/" class="nav-link">NodeJs笔记</a></li><li class="dropdown-subitem"><a href="/note/reg/" class="nav-link">正则表达式笔记</a></li><li class="dropdown-subitem"><a href="/note/vue/" class="nav-link">Vue笔记</a></li><li class="dropdown-subitem"><a href="/note/react/" class="nav-link">react笔记</a></li><li class="dropdown-subitem"><a href="/note/wx/" class="nav-link">微信小程序笔记</a></li><li class="dropdown-subitem"><a href="/note/uniapp/" class="nav-link">uniapp笔记</a></li><li class="dropdown-subitem"><a href="/note/echarts/" class="nav-link">echarts笔记</a></li><li class="dropdown-subitem"><a href="/note/git/" class="nav-link">Git笔记</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="后端" class="dropdown-title"><a href="/back/" class="link-title">后端</a> <span class="title" style="display:none;">后端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/note/java/" class="nav-link">JAVA</a></li><li class="dropdown-item"><!----> <a href="/note/javaweb/" class="nav-link">JavaWeb</a></li><li class="dropdown-item"><!----> <a href="/note/mysql/" class="nav-link">MySql</a></li><li class="dropdown-item"><!----> <a href="/note/ssm/" class="nav-link">ssm</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="算法" class="dropdown-title"><a href="/algor/" class="link-title">算法</a> <span class="title" style="display:none;">算法</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/note/sf/" class="nav-link">算法训练营</a></li><li class="dropdown-item"><!----> <a href="/note/js-sf/" class="nav-link">js数据结构与算法</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="面试" class="dropdown-title"><a href="/mianshi/" class="link-title">面试</a> <span class="title" style="display:none;">面试</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/note/lqb/" class="nav-link">蓝桥杯备战</a></li><li class="dropdown-item"><!----> <a href="/note/ms/" class="nav-link">前端面试</a></li><li class="dropdown-item"><!----> <a href="/note/hmms/" class="nav-link">黑马面试</a></li><li class="dropdown-item"><!----> <a href="/note/xzms/" class="nav-link">校招零距离面试</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="解决方案" class="dropdown-title"><a href="/resolve/" class="link-title">解决方案</a> <span class="title" style="display:none;">解决方案</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/note/qd-resolve/" class="nav-link">前端解决方案</a></li><li class="dropdown-item"><!----> <a href="/note/hd-resolve/" class="nav-link">后端解决方案</a></li></ul></div></div><div class="nav-item"><a href="/pages/beb6c0bd8a66cea6/" class="nav-link">收藏</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/archives/" class="nav-link">归档</a></li></ul></div></div> <a href="https://github.com/linxin1123/vuepress-blog" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><div class="blogger"><img src="https://lingxin-tanhua.oss-cn-shanghai.aliyuncs.com/QQ%E6%88%AA%E5%9B%BE20220503092755.png"> <div class="blogger-info"><h3>lingxin</h3> <span>凌歆</span></div></div> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端" class="dropdown-title"><a href="/web/" class="link-title">前端</a> <span class="title" style="display:none;">前端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>学习笔记</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/note/html/" class="nav-link">HTML笔记</a></li><li class="dropdown-subitem"><a href="/note/js-low/" class="nav-link">JavaScript基础笔记</a></li><li class="dropdown-subitem"><a href="/note/js-high/" class="nav-link">JavaScript高阶笔记</a></li><li class="dropdown-subitem"><a href="/note/js-dom-bom/" class="nav-link">JavaScript DOM和BOM笔记</a></li><li class="dropdown-subitem"><a href="/note/jquery/" class="nav-link">jQuery笔记</a></li><li class="dropdown-subitem"><a href="/note/ajax/" class="nav-link">Ajax笔记</a></li><li class="dropdown-subitem"><a href="/note/nodejs/" class="nav-link">NodeJs笔记</a></li><li class="dropdown-subitem"><a href="/note/reg/" class="nav-link">正则表达式笔记</a></li><li class="dropdown-subitem"><a href="/note/vue/" class="nav-link">Vue笔记</a></li><li class="dropdown-subitem"><a href="/note/react/" class="nav-link">react笔记</a></li><li class="dropdown-subitem"><a href="/note/wx/" class="nav-link">微信小程序笔记</a></li><li class="dropdown-subitem"><a href="/note/uniapp/" class="nav-link">uniapp笔记</a></li><li class="dropdown-subitem"><a href="/note/echarts/" class="nav-link">echarts笔记</a></li><li class="dropdown-subitem"><a href="/note/git/" class="nav-link">Git笔记</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="后端" class="dropdown-title"><a href="/back/" class="link-title">后端</a> <span class="title" style="display:none;">后端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/note/java/" class="nav-link">JAVA</a></li><li class="dropdown-item"><!----> <a href="/note/javaweb/" class="nav-link">JavaWeb</a></li><li class="dropdown-item"><!----> <a href="/note/mysql/" class="nav-link">MySql</a></li><li class="dropdown-item"><!----> <a href="/note/ssm/" class="nav-link">ssm</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="算法" class="dropdown-title"><a href="/algor/" class="link-title">算法</a> <span class="title" style="display:none;">算法</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/note/sf/" class="nav-link">算法训练营</a></li><li class="dropdown-item"><!----> <a href="/note/js-sf/" class="nav-link">js数据结构与算法</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="面试" class="dropdown-title"><a href="/mianshi/" class="link-title">面试</a> <span class="title" style="display:none;">面试</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/note/lqb/" class="nav-link">蓝桥杯备战</a></li><li class="dropdown-item"><!----> <a href="/note/ms/" class="nav-link">前端面试</a></li><li class="dropdown-item"><!----> <a href="/note/hmms/" class="nav-link">黑马面试</a></li><li class="dropdown-item"><!----> <a href="/note/xzms/" class="nav-link">校招零距离面试</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="解决方案" class="dropdown-title"><a href="/resolve/" class="link-title">解决方案</a> <span class="title" style="display:none;">解决方案</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/note/qd-resolve/" class="nav-link">前端解决方案</a></li><li class="dropdown-item"><!----> <a href="/note/hd-resolve/" class="nav-link">后端解决方案</a></li></ul></div></div><div class="nav-item"><a href="/pages/beb6c0bd8a66cea6/" class="nav-link">收藏</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/archives/" class="nav-link">归档</a></li></ul></div></div> <a href="https://github.com/linxin1123/vuepress-blog" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>学习笔记</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>蓝桥杯备战</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/pages/fc8666/" aria-current="page" class="active sidebar-link">html+css部分复习-cnblog</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level2"><a href="/pages/fc8666/#html-css部分复习-蓝桥杯参考" class="sidebar-link">HTML+CSS部分复习(蓝桥杯参考)</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_0-考前准备" class="sidebar-link">0. 考前准备</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_1-web标准" class="sidebar-link">1. web标准</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_2-前端插件安装" class="sidebar-link">2. 前端插件安装</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_3-img的border属性" class="sidebar-link">3. img的border属性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_4-a标签target属性" class="sidebar-link">4. a标签target属性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_5-a标签实现锚点链接" class="sidebar-link">5. a标签实现锚点链接</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_6-表格属性" class="sidebar-link">6. 表格属性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_7-table单元格合并" class="sidebar-link">7.table单元格合并</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_8-表单域form属性" class="sidebar-link">8.表单域form属性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_9-input表单控件" class="sidebar-link">9.input表单控件</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_10-单选框分组" class="sidebar-link">10.单选框分组</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_11-单选框和多选框选中" class="sidebar-link">11.单选框和多选框选中</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_12-label标签" class="sidebar-link">12. label标签</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_13-select控件" class="sidebar-link">13. select控件</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_14-textarea设置默认值" class="sidebar-link">14. textarea设置默认值</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_15-css-text-decoration" class="sidebar-link">15.css text-decoration</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_16-行间距" class="sidebar-link">16 行间距</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_17-emmet语法" class="sidebar-link">17. Emmet语法</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_18-链接伪类选择器" class="sidebar-link">18.链接伪类选择器</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_19-focus伪类选择器" class="sidebar-link">19 :focus伪类选择器</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_20-块级元素" class="sidebar-link">20 块级元素</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_21-行内块元素" class="sidebar-link">21. 行内块元素</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_22-行高垂直居中" class="sidebar-link">22.行高垂直居中</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_23-背景图像固定" class="sidebar-link">23. 背景图像固定</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_24-边框合并css" class="sidebar-link">24. 边框合并css</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_25-padding不会撑大盒子的情况" class="sidebar-link">25.padding不会撑大盒子的情况</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_26-外边距实现水平居中" class="sidebar-link">26.外边距实现水平居中</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_27-边框圆角实现原理" class="sidebar-link">27.边框圆角实现原理</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_28-圆角边框特殊使用" class="sidebar-link">28.圆角边框特殊使用</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_29-盒子阴影" class="sidebar-link">29.盒子阴影</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_30-文字阴影" class="sidebar-link">30 文字阴影</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_31-浮动元素的特性" class="sidebar-link">31. 浮动元素的特性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_32-清除浮动的原因" class="sidebar-link">32. 清除浮动的原因</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_33-清除浮动" class="sidebar-link">33. 清除浮动</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_34-行内块元素" class="sidebar-link">34. 行内块元素</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_35-固定定位fixed固定在版心-其他盒子-右侧位置" class="sidebar-link">35.固定定位fixed固定在版心(其他盒子)右侧位置</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_36-粘性定位" class="sidebar-link">36 粘性定位</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_37-定位特性-脱标特性" class="sidebar-link">37 定位特性，脱标特性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_38-浮动-定位的区别" class="sidebar-link">38 浮动，定位的区别</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_39-visibility" class="sidebar-link">39.visibility</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_40-css三角形" class="sidebar-link">40 CSS三角形</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_41-鼠标样式" class="sidebar-link">41.鼠标样式</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_42-轮廓线" class="sidebar-link">42. 轮廓线</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_43-防止拖拽文本域" class="sidebar-link">43. 防止拖拽文本域</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_44-vertical-align属性" class="sidebar-link">44.vertical-align属性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_45-解决图片底部默认空白缝隙问题" class="sidebar-link">45. 解决图片底部默认空白缝隙问题</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_46-单行文本溢出显示省略号" class="sidebar-link">46 单行文本溢出显示省略号</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_46-多行文本溢出显示省略号" class="sidebar-link">46 多行文本溢出显示省略号</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_47-margin负值的使用" class="sidebar-link">47 margin负值的使用</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_48-直角三角形" class="sidebar-link">48.直角三角形</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_49-video标签兼容性" class="sidebar-link">49 video标签兼容性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_50-video标签属性" class="sidebar-link">50 video标签属性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_51-audio标签" class="sidebar-link">51. audio标签</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_52-html5新增input类型" class="sidebar-link">52. HTML5新增input类型</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_53-html5新增表单属性" class="sidebar-link">53. HTML5新增表单属性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_54-修改placeholder颜色" class="sidebar-link">54. 修改placeholder颜色</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_55-css3新增选择器" class="sidebar-link">55 CSS3新增选择器</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_56-css3权重问题" class="sidebar-link">56 CSS3权重问题</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_57-结构伪类选择器" class="sidebar-link">57.结构伪类选择器</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_58-nth-child-与nth-of-type的区别" class="sidebar-link">58 nth-child()与nth-of-type的区别</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_59-伪元素选择器" class="sidebar-link">59 伪元素选择器</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_60-css3盒子模型" class="sidebar-link">60 CSS3盒子模型</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_61-css3滤镜" class="sidebar-link">61. CSS3滤镜</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_61-css3的calc函数" class="sidebar-link">61. CSS3的Calc函数</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_62-css的过渡" class="sidebar-link">62. CSS的过渡</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_63-logo-seo优化" class="sidebar-link">63 LOGO SEO优化</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_64-2d转换-translate" class="sidebar-link">64 2D转换-translate</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_65-2d转换-rotate实现三角" class="sidebar-link">65 2D转换-rotate实现三角</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_66-rotate的转换中心点" class="sidebar-link">66 rotate的转换中心点</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_67-2d转换复合写法" class="sidebar-link">67.2D转换复合写法</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_68-动画的基本使用" class="sidebar-link">68 动画的基本使用</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_69-焦点图综合案例" class="sidebar-link">69.焦点图综合案例</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_70-动画属性-animation-timing-function" class="sidebar-link">70 动画属性-animation-timing-function</a></li><li class="sidebar-sub-header level5"><a href="/pages/fc8666/#打字机效果" class="sidebar-link">打字机效果</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_71-三维坐标系" class="sidebar-link">71 三维坐标系</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_72-透视" class="sidebar-link">72. 透视</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_73-3d呈现" class="sidebar-link">73. 3D呈现</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_74-旋转木马的效果" class="sidebar-link">74 旋转木马的效果</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_75-浏览器私有前缀" class="sidebar-link">75.浏览器私有前缀</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_75-移动端视口" class="sidebar-link">75.移动端视口</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_76-物理像素" class="sidebar-link">76 物理像素</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_77-移动端css初始化" class="sidebar-link">77 移动端CSS初始化</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_78-移动端特殊样式" class="sidebar-link">78 . 移动端特殊样式</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_79-移动端缩放限制" class="sidebar-link">79.移动端缩放限制</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_80-二倍精灵图" class="sidebar-link">80 二倍精灵图</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_81-flex布局注意reverse" class="sidebar-link">81. flex布局注意reverse</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_82-flex-侧轴上子元素对其方式-多行" class="sidebar-link">82  flex-侧轴上子元素对其方式（多行）</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_83-flex-属性连写" class="sidebar-link">83. flex-属性连写</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_84-order布局子项常见属性" class="sidebar-link">84. order布局子项常见属性</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_85-媒体查询" class="sidebar-link">85 媒体查询</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_86-媒体查询引入资源" class="sidebar-link">86.媒体查询引入资源</a></li><li class="sidebar-sub-header level3"><a href="/pages/fc8666/#_87-响应式工具" class="sidebar-link">87. 响应式工具</a></li></ul></li></ul></li><li><a href="/pages/f57a40/" class="sidebar-link">Dom和Bom复习-cnblog</a></li><li><a href="/pages/e4078d/" class="sidebar-link">ajax复习</a></li><li><a href="/pages/731437/" class="sidebar-link">NodeJs复习-cnblog</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>前端面试</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>黑马面试</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>校招零距离面试</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-06225672><div class="articleInfo" data-v-06225672><ul class="breadcrumbs" data-v-06225672><li data-v-06225672><a href="/" title="首页" class="iconfont icon-home router-link-active" data-v-06225672></a></li> <li data-v-06225672><a href="/mianshi/#面试" data-v-06225672>面试</a></li><li data-v-06225672><a href="/mianshi/#蓝桥杯备战" data-v-06225672>蓝桥杯备战</a></li></ul> <div class="info" data-v-06225672><div title="作者" class="author iconfont icon-touxiang" data-v-06225672><a href="https://github.com/linxin1123" target="_blank" title="作者" class="beLink" data-v-06225672>lingxin</a></div> <div title="创建时间" class="date iconfont icon-riqi" data-v-06225672><a href="javascript:;" data-v-06225672>2023-02-17</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-title">目录</div> <div class="right-menu-content"></div></div></div> <h1><img src="">html+css部分复习-cnblog<!----></h1>  <div class="theme-vdoing-content content__default"><h2 id="html-css部分复习-蓝桥杯参考"><a href="#html-css部分复习-蓝桥杯参考" class="header-anchor">#</a> HTML+CSS部分复习(蓝桥杯参考)</h2> <h3 id="_0-考前准备"><a href="#_0-考前准备" class="header-anchor">#</a> 0. 考前准备</h3> <ul><li>插件安装</li> <li>设置：文件自动格式化</li></ul> <h3 id="_1-web标准"><a href="#_1-web标准" class="header-anchor">#</a> 1. web标准</h3> <ul><li>结构(HTML)</li> <li>表现(CSS)</li> <li>行为(js)</li></ul> <h3 id="_2-前端插件安装"><a href="#_2-前端插件安装" class="header-anchor">#</a> 2. 前端插件安装</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232147386-177692336.png" alt=""></p> <h3 id="_3-img的border属性"><a href="#_3-img的border属性" class="header-anchor">#</a> 3. img的border属性</h3> <ul><li>属性值：数字，单位：像素</li> <li>边框粗细</li></ul> <h3 id="_4-a标签target属性"><a href="#_4-a标签target属性" class="header-anchor">#</a> 4. a标签target属性</h3> <ul><li>链接打开方式</li> <li>默认值_self当前窗口，<code>_blank</code>新的窗口</li></ul> <h3 id="_5-a标签实现锚点链接"><a href="#_5-a标签实现锚点链接" class="header-anchor">#</a> 5. a标签实现锚点链接</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232146574-1400359108.png" alt=""></p> <h3 id="_6-表格属性"><a href="#_6-表格属性" class="header-anchor">#</a> 6. 表格属性</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232145911-621944125.png" alt=""></p> <h3 id="_7-table单元格合并"><a href="#_7-table单元格合并" class="header-anchor">#</a> 7.table单元格合并</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232144835-432145370.png" alt=""></p> <ul><li>colspan:跨列，水平方向</li> <li>rowspan:跨行，垂直方向</li></ul> <h3 id="_8-表单域form属性"><a href="#_8-表单域form属性" class="header-anchor">#</a> 8.表单域form属性</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232144339-1190894449.png" alt=""></p> <h3 id="_9-input表单控件"><a href="#_9-input表单控件" class="header-anchor">#</a> 9.input表单控件</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232143379-1863042540.png" alt=""></p> <h3 id="_10-单选框分组"><a href="#_10-单选框分组" class="header-anchor">#</a> 10.单选框分组</h3> <div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token comment">&lt;!-- 单选框 --&gt;</span>
        <span class="token comment">&lt;!-- name属性用于分组，同组的只有一个可以被选中 --&gt;</span>
        <span class="token comment">&lt;!-- checked属性用于默认选中 --&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">&gt;</span></span>性别： <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>radio<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>性别<span class="token punctuation">&quot;</span></span> <span class="token attr-name">checked</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span><span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>男  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>radio<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>性别<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>女<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h3 id="_11-单选框和多选框选中"><a href="#_11-单选框和多选框选中" class="header-anchor">#</a> 11.单选框和多选框选中</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232142433-556778351.png" alt=""></p> <ul><li>注意属性值为checked</li> <li>属性名checked</li> <li>也可以直接加上checked属性</li></ul> <div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">&gt;</span></span>爱好：<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>checkbox<span class="token punctuation">&quot;</span></span> <span class="token attr-name">checked</span><span class="token punctuation">&gt;</span></span>敲代码 <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>checkbox<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span> 睡觉<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_12-label标签"><a href="#_12-label标签" class="header-anchor">#</a> 12. label标签</h3> <div class="language-html line-numbers-mode"><pre class="language-html"><code> <span class="token comment">&lt;!--第一种 
        label将文本宇表单标签联系在一起 
        表单id与label的for一致
    --&gt;</span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>radio<span class="token punctuation">&quot;</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>1<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>性别<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>label</span> <span class="token attr-name">for</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>1<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>男<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>label</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>radio<span class="token punctuation">&quot;</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>2<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>性别<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>label</span> <span class="token attr-name">for</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>2<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>女<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>label</span><span class="token punctuation">&gt;</span></span>

    <span class="token comment">&lt;!-- 第二种 --&gt;</span>
    <span class="token comment">&lt;!-- 用label标签将表单标签包裹起来，去掉for属性 --&gt;</span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>label</span> <span class="token punctuation">&gt;</span></span> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>radio<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>性别<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>男 <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>label</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>label</span> <span class="token punctuation">&gt;</span></span> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>radio<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>性别<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>女 <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>label</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br></div></div><h3 id="_13-select控件"><a href="#_13-select控件" class="header-anchor">#</a> 13. select控件</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232142027-1402614480.png" alt=""></p> <ul><li>注意属性值为selected</li></ul> <h3 id="_14-textarea设置默认值"><a href="#_14-textarea设置默认值" class="header-anchor">#</a> 14. textarea设置默认值</h3> <div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>textarea</span><span class="token punctuation">&gt;</span></span>需要设置的默认值<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>textarea</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>js</li></ul> <div class="language-js line-numbers-mode"><pre class="language-js"><code> <span class="token operator">&lt;</span>textarea id<span class="token operator">=</span><span class="token string">&quot;topic&quot;</span> rows<span class="token operator">=</span><span class="token string">&quot;10&quot;</span> name<span class="token operator">=</span><span class="token string">&quot;topic&quot;</span>  <span class="token operator">&gt;</span><span class="token operator">&lt;</span><span class="token operator">/</span>textarea<span class="token operator">&gt;</span>
                          
     <span class="token operator">&lt;</span>script<span class="token operator">&gt;</span>
        document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">&quot;topic&quot;</span><span class="token punctuation">)</span><span class="token punctuation">.</span>value<span class="token operator">=</span><span class="token string">&quot;helloword&quot;</span>
     <span class="token operator">&lt;</span><span class="token operator">/</span>script<span class="token operator">&gt;</span>
                         
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><h3 id="_15-css-text-decoration"><a href="#_15-css-text-decoration" class="header-anchor">#</a> 15.css text-decoration</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232141594-133791.png" alt=""></p> <h3 id="_16-行间距"><a href="#_16-行间距" class="header-anchor">#</a> 16 行间距</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232140378-1368684855.png" alt=""></p> <h3 id="_17-emmet语法"><a href="#_17-emmet语法" class="header-anchor">#</a> 17. Emmet语法</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232139440-1737731339.png" alt=""></p> <ul><li>自增的使用</li></ul> <div class="language-html line-numbers-mode"><pre class="language-html"><code>.demo$*5

// 结果代码

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232138844-1360195636.png" alt=""></p> <ul><li>闭合标签内部内容</li></ul> <div class="language-html line-numbers-mode"><pre class="language-html"><code>div{666}

// 结果代码
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>
    666
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><h3 id="_18-链接伪类选择器"><a href="#_18-链接伪类选择器" class="header-anchor">#</a> 18.链接伪类选择器</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232138306-40450915.png" alt=""></p> <h3 id="_19-focus伪类选择器"><a href="#_19-focus伪类选择器" class="header-anchor">#</a> 19 :focus伪类选择器</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232137727-91390621.png" alt=""></p> <h3 id="_20-块级元素"><a href="#_20-块级元素" class="header-anchor">#</a> 20 块级元素</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232137180-1025886105.png" alt=""></p> <div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>
        666
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">&gt;</span></span>

// 相当于

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">&gt;</span></span>
    
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>
    666
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><h3 id="_21-行内块元素"><a href="#_21-行内块元素" class="header-anchor">#</a> 21. 行内块元素</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232136766-1418106028.png" alt=""></p> <h3 id="_22-行高垂直居中"><a href="#_22-行高垂直居中" class="header-anchor">#</a> 22.行高垂直居中</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232136120-1726499738.png" alt=""></p> <h3 id="_23-背景图像固定"><a href="#_23-背景图像固定" class="header-anchor">#</a> 23. 背景图像固定</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232135375-1846913538.png" alt=""></p> <h3 id="_24-边框合并css"><a href="#_24-边框合并css" class="header-anchor">#</a> 24. 边框合并css</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232134736-409601652.png" alt=""></p> <h3 id="_25-padding不会撑大盒子的情况"><a href="#_25-padding不会撑大盒子的情况" class="header-anchor">#</a> 25.padding不会撑大盒子的情况</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232134179-162077646.png" alt=""></p> <h3 id="_26-外边距实现水平居中"><a href="#_26-外边距实现水平居中" class="header-anchor">#</a> 26.外边距实现水平居中</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232133729-1738534128.png" alt=""></p> <h3 id="_27-边框圆角实现原理"><a href="#_27-边框圆角实现原理" class="header-anchor">#</a> 27.边框圆角实现原理</h3> <ul><li>border-radius</li></ul> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232133056-990054854.png" alt=""></p> <h3 id="_28-圆角边框特殊使用"><a href="#_28-圆角边框特殊使用" class="header-anchor">#</a> 28.圆角边框特殊使用</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232132631-385685909.png" alt=""></p> <ul><li>正方形可以写50%</li> <li>圆角矩形必须写高度的一半，写50%会成椭圆</li></ul> <h3 id="_29-盒子阴影"><a href="#_29-盒子阴影" class="header-anchor">#</a> 29.盒子阴影</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232131284-1771354919.png" alt=""></p> <h3 id="_30-文字阴影"><a href="#_30-文字阴影" class="header-anchor">#</a> 30 文字阴影</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232130408-1444755420.png" alt=""></p> <h3 id="_31-浮动元素的特性"><a href="#_31-浮动元素的特性" class="header-anchor">#</a> 31. 浮动元素的特性</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232129884-197178221.png" alt=""></p> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232128681-2031115335.png" alt=""></p> <ul><li>无外边距塌陷现象</li></ul> <h3 id="_32-清除浮动的原因"><a href="#_32-清除浮动的原因" class="header-anchor">#</a> 32. 清除浮动的原因</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232127786-961864261.png" alt=""></p> <h3 id="_33-清除浮动"><a href="#_33-清除浮动" class="header-anchor">#</a> 33. 清除浮动</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232126416-1274670827.png" alt=""></p> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232125852-635129985.png" alt="QQ截图20230108191923"></p> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232125158-2050983427.png" alt="QQ截图20230108192050"></p> <h3 id="_34-行内块元素"><a href="#_34-行内块元素" class="header-anchor">#</a> 34. 行内块元素</h3> <ul><li>一起水平排列之间会有空隙</li></ul> <h3 id="_35-固定定位fixed固定在版心-其他盒子-右侧位置"><a href="#_35-固定定位fixed固定在版心-其他盒子-右侧位置" class="header-anchor">#</a> 35.固定定位fixed固定在版心(其他盒子)右侧位置</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232124359-677805483.png" alt=""></p> <h3 id="_36-粘性定位"><a href="#_36-粘性定位" class="header-anchor">#</a> 36 粘性定位</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232123447-620173287.png" alt=""></p> <h3 id="_37-定位特性-脱标特性"><a href="#_37-定位特性-脱标特性" class="header-anchor">#</a> 37 定位特性，脱标特性</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232122524-124405398.png" alt=""></p> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232121985-814976019.png" alt="QQ截图20230108210407"></p> <h3 id="_38-浮动-定位的区别"><a href="#_38-浮动-定位的区别" class="header-anchor">#</a> 38 浮动，定位的区别</h3> <ul><li>浮动不脱离文档流</li> <li>定位脱离了文档流</li></ul> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232121394-1444335730.png" alt="QQ截图20230108210633"></p> <h3 id="_39-visibility"><a href="#_39-visibility" class="header-anchor">#</a> 39.visibility</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232120128-124063693.png" alt=""></p> <h3 id="_40-css三角形"><a href="#_40-css三角形" class="header-anchor">#</a> 40 CSS三角形</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232119654-1120045533.png" alt=""></p> <ul><li>font-size:0,line-height:0;照顾兼容性问题</li></ul> <h3 id="_41-鼠标样式"><a href="#_41-鼠标样式" class="header-anchor">#</a> 41.鼠标样式</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232119228-266030152.png" alt=""></p> <h3 id="_42-轮廓线"><a href="#_42-轮廓线" class="header-anchor">#</a> 42. 轮廓线</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232118686-1290518577.png" alt=""></p> <h3 id="_43-防止拖拽文本域"><a href="#_43-防止拖拽文本域" class="header-anchor">#</a> 43. 防止拖拽文本域</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232117920-2044426235.png" alt=""></p> <h3 id="_44-vertical-align属性"><a href="#_44-vertical-align属性" class="header-anchor">#</a> 44.vertical-align属性</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232117410-864921213.png" alt=""></p> <h3 id="_45-解决图片底部默认空白缝隙问题"><a href="#_45-解决图片底部默认空白缝隙问题" class="header-anchor">#</a> 45. 解决图片底部默认空白缝隙问题</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232116606-1371582657.png" alt=""></p> <h3 id="_46-单行文本溢出显示省略号"><a href="#_46-单行文本溢出显示省略号" class="header-anchor">#</a> 46 单行文本溢出显示省略号</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232114917-862425202.png" alt=""></p> <h3 id="_46-多行文本溢出显示省略号"><a href="#_46-多行文本溢出显示省略号" class="header-anchor">#</a> 46 多行文本溢出显示省略号</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232114268-1631495576.png" alt=""></p> <h3 id="_47-margin负值的使用"><a href="#_47-margin负值的使用" class="header-anchor">#</a> 47 margin负值的使用</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232113293-497274901.png" alt=""></p> <h3 id="_48-直角三角形"><a href="#_48-直角三角形" class="header-anchor">#</a> 48.直角三角形</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232112694-1696006818.png" alt=""></p> <h3 id="_49-video标签兼容性"><a href="#_49-video标签兼容性" class="header-anchor">#</a> 49 video标签兼容性</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232111934-1151824117.png" alt=""></p> <h3 id="_50-video标签属性"><a href="#_50-video标签属性" class="header-anchor">#</a> 50 video标签属性</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232109971-452846800.png" alt=""></p> <h3 id="_51-audio标签"><a href="#_51-audio标签" class="header-anchor">#</a> 51. audio标签</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232108158-533230144.png" alt=""></p> <h3 id="_52-html5新增input类型"><a href="#_52-html5新增input类型" class="header-anchor">#</a> 52. HTML5新增input类型</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232106988-1530908418.png" alt=""></p> <h3 id="_53-html5新增表单属性"><a href="#_53-html5新增表单属性" class="header-anchor">#</a> 53. HTML5新增表单属性</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232104609-2371557.png" alt=""></p> <h3 id="_54-修改placeholder颜色"><a href="#_54-修改placeholder颜色" class="header-anchor">#</a> 54. 修改placeholder颜色</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232102848-1458389751.png" alt=""></p> <h3 id="_55-css3新增选择器"><a href="#_55-css3新增选择器" class="header-anchor">#</a> 55 CSS3新增选择器</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232102434-1273766903.png" alt=""></p> <h3 id="_56-css3权重问题"><a href="#_56-css3权重问题" class="header-anchor">#</a> 56 CSS3权重问题</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232101702-1116783396.png" alt=""></p> <h3 id="_57-结构伪类选择器"><a href="#_57-结构伪类选择器" class="header-anchor">#</a> 57.结构伪类选择器</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232101172-1679302885.png" alt=""></p> <h3 id="_58-nth-child-与nth-of-type的区别"><a href="#_58-nth-child-与nth-of-type的区别" class="header-anchor">#</a> 58 nth-child()与nth-of-type的区别</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232059693-1469232406.png" alt=""></p> <h3 id="_59-伪元素选择器"><a href="#_59-伪元素选择器" class="header-anchor">#</a> 59 伪元素选择器</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232053024-28884855.png" alt=""></p> <h3 id="_60-css3盒子模型"><a href="#_60-css3盒子模型" class="header-anchor">#</a> 60 CSS3盒子模型</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232050580-234566088.png" alt=""></p> <h3 id="_61-css3滤镜"><a href="#_61-css3滤镜" class="header-anchor">#</a> 61. CSS3滤镜</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232049906-1670836110.png" alt=""></p> <ul><li>是css属性</li></ul> <h3 id="_61-css3的calc函数"><a href="#_61-css3的calc函数" class="header-anchor">#</a> 61. CSS3的Calc函数</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232048067-840857371.png" alt=""></p> <h3 id="_62-css的过渡"><a href="#_62-css的过渡" class="header-anchor">#</a> 62. CSS的过渡</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232047409-811218288.png" alt=""></p> <ul><li>可以查阅css文档了解更多的信息</li></ul> <h3 id="_63-logo-seo优化"><a href="#_63-logo-seo优化" class="header-anchor">#</a> 63 LOGO SEO优化</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232046533-147582588.png" alt=""></p> <h3 id="_64-2d转换-translate"><a href="#_64-2d转换-translate" class="header-anchor">#</a> 64 2D转换-translate</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232045194-1753064949.png" alt=""></p> <h3 id="_65-2d转换-rotate实现三角"><a href="#_65-2d转换-rotate实现三角" class="header-anchor">#</a> 65 2D转换-rotate实现三角</h3> <ul><li>html</li></ul> <div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>
    
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><ul><li>css</li></ul> <div class="language-js line-numbers-mode"><pre class="language-js"><code>div<span class="token punctuation">{</span>
    <span class="token literal-property property">position</span><span class="token operator">:</span>relative<span class="token punctuation">;</span>
    <span class="token literal-property property">width</span><span class="token operator">:</span>200px<span class="token punctuation">;</span>
    <span class="token literal-property property">height</span><span class="token operator">:</span>50px<span class="token punctuation">;</span>
    <span class="token literal-property property">border</span><span class="token operator">:</span>1px soild #ccc<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">// 伪元素做三角</span>
<span class="token literal-property property">div</span><span class="token operator">:</span><span class="token operator">:</span>after<span class="token punctuation">{</span>
    <span class="token literal-property property">position</span><span class="token operator">:</span><span class="token string">'absolute'</span><span class="token punctuation">;</span>
    <span class="token literal-property property">content</span><span class="token operator">:</span><span class="token string">''</span><span class="token punctuation">;</span>
    
    <span class="token literal-property property">width</span><span class="token operator">:</span>10px<span class="token punctuation">;</span>
    <span class="token literal-property property">height</span><span class="token operator">:</span>10px<span class="token punctuation">;</span>
    
    <span class="token literal-property property">right</span><span class="token operator">:</span><span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token literal-property property">top</span><span class="token operator">:</span><span class="token number">0</span><span class="token punctuation">;</span>
    
    <span class="token comment">// 我们只保留右边框和下边框</span>
    
    <span class="token comment">// 然后旋转45deg</span>
    
    border<span class="token operator">-</span>right<span class="token operator">:</span>1px soild #<span class="token number">000</span><span class="token punctuation">;</span>
    border<span class="token operator">-</span>bottom<span class="token operator">:</span>1px soild #<span class="token number">000</span><span class="token punctuation">;</span>
    
    <span class="token literal-property property">transform</span><span class="token operator">:</span><span class="token function">rotate</span><span class="token punctuation">(</span>45deg<span class="token punctuation">)</span><span class="token punctuation">;</span>
    
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br></div></div><p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232043860-1370830282.png" alt=""></p> <h3 id="_66-rotate的转换中心点"><a href="#_66-rotate的转换中心点" class="header-anchor">#</a> 66 rotate的转换中心点</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232043469-203680252.png" alt=""></p> <h3 id="_67-2d转换复合写法"><a href="#_67-2d转换复合写法" class="header-anchor">#</a> 67.2D转换复合写法</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232042797-696254722.png" alt=""></p> <h3 id="_68-动画的基本使用"><a href="#_68-动画的基本使用" class="header-anchor">#</a> 68 动画的基本使用</h3> <ol><li>定义动画</li></ol> <div class="language-css line-numbers-mode"><pre class="language-css"><code><span class="token atrule"><span class="token rule">@keyframes</span> move</span><span class="token punctuation">{</span>
    
    <span class="token selector">// 开始状态
    0%</span><span class="token punctuation">{</span>
        <span class="token property">transform</span><span class="token punctuation">:</span><span class="token function">translateX</span><span class="token punctuation">(</span>0px<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
    
    <span class="token selector">// 结束状态
    100%</span><span class="token punctuation">{</span>
       <span class="token property">transform</span><span class="token punctuation">:</span><span class="token function">translateX</span><span class="token punctuation">(</span>100px<span class="token punctuation">)</span><span class="token punctuation">;</span> 
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><ol><li>使用动画</li></ol> <div class="language-css line-numbers-mode"><pre class="language-css"><code><span class="token selector">.box</span><span class="token punctuation">{</span>
    <span class="token property">animation-name</span><span class="token punctuation">:</span>move<span class="token punctuation">;</span>
    <span class="token property">animation-duration</span><span class="token punctuation">:</span>3s<span class="token punctuation">;</span>
    
    // 或者属性连写
    <span class="token property">animation</span><span class="token punctuation">:</span>move<span class="token punctuation">,</span>3s<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232042164-143831927.png" alt=""></p> <ul><li>动画完整属性</li></ul> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232041121-1017562876.png" alt=""></p> <h3 id="_69-焦点图综合案例"><a href="#_69-焦点图综合案例" class="header-anchor">#</a> 69.焦点图综合案例</h3> <div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token doctype"><span class="token punctuation">&lt;!</span><span class="token doctype-tag">DOCTYPE</span> <span class="token name">html</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>en<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>UTF-8<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>viewport<span class="token punctuation">&quot;</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>width=device-width, initial-scale=1.0<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">http-equiv</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>X-UA-Compatible<span class="token punctuation">&quot;</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>ie=edge<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">&gt;</span></span>Document<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
        <span class="token selector">body</span> <span class="token punctuation">{</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> #333<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">.map</span> <span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> relative<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> 747px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> 616px<span class="token punctuation">;</span>
            <span class="token property">background</span><span class="token punctuation">:</span> <span class="token url"><span class="token function">url</span><span class="token punctuation">(</span>media/map.png<span class="token punctuation">)</span></span> no-repeat<span class="token punctuation">;</span>
            <span class="token property">margin</span><span class="token punctuation">:</span> 0 auto<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">.city</span> <span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
            <span class="token property">top</span><span class="token punctuation">:</span> 227px<span class="token punctuation">;</span>
            <span class="token property">right</span><span class="token punctuation">:</span> 193px<span class="token punctuation">;</span>
            <span class="token property">color</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">.tb</span> <span class="token punctuation">{</span>
            <span class="token property">top</span><span class="token punctuation">:</span> 500px<span class="token punctuation">;</span>
            <span class="token property">right</span><span class="token punctuation">:</span> 80px<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">.dotted</span> <span class="token punctuation">{</span>
            <span class="token property">width</span><span class="token punctuation">:</span> 8px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> 8px<span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> #09f<span class="token punctuation">;</span>
            <span class="token property">border-radius</span><span class="token punctuation">:</span> 50%<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">.city div[class^=&quot;pulse&quot;]</span> <span class="token punctuation">{</span>
            <span class="token comment">/* 保证我们小波纹在父盒子里面水平垂直居中 放大之后就会中心向四周发散 */</span>
            <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
            <span class="token property">top</span><span class="token punctuation">:</span> 50%<span class="token punctuation">;</span>
            <span class="token property">left</span><span class="token punctuation">:</span> 50%<span class="token punctuation">;</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">translate</span><span class="token punctuation">(</span>-50%<span class="token punctuation">,</span> -50%<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> 8px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> 8px<span class="token punctuation">;</span>
            <span class="token property">box-shadow</span><span class="token punctuation">:</span> 0 0 12px #009dfd<span class="token punctuation">;</span>
            <span class="token property">border-radius</span><span class="token punctuation">:</span> 50%<span class="token punctuation">;</span>
            <span class="token property">animation</span><span class="token punctuation">:</span> pulse 1.2s linear infinite<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">.city div.pulse2</span> <span class="token punctuation">{</span>
            <span class="token property">animation-delay</span><span class="token punctuation">:</span> 0.4s<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">.city div.pulse3</span> <span class="token punctuation">{</span>
            <span class="token property">animation-delay</span><span class="token punctuation">:</span> 0.8s<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token atrule"><span class="token rule">@keyframes</span> pulse</span> <span class="token punctuation">{</span>
            <span class="token selector">0%</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
            <span class="token selector">70%</span> <span class="token punctuation">{</span>
                <span class="token comment">/* transform: scale(5);  我们不要用scale 因为他会让 阴影变大*/</span>
                <span class="token property">width</span><span class="token punctuation">:</span> 40px<span class="token punctuation">;</span>
                <span class="token property">height</span><span class="token punctuation">:</span> 40px<span class="token punctuation">;</span>
                <span class="token property">opacity</span><span class="token punctuation">:</span> 1<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
            <span class="token selector">100%</span> <span class="token punctuation">{</span>
                <span class="token property">width</span><span class="token punctuation">:</span> 70px<span class="token punctuation">;</span>
                <span class="token property">height</span><span class="token punctuation">:</span> 70px<span class="token punctuation">;</span>
                <span class="token property">opacity</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    </span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>map<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>city<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>dotted<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>pulse1<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>pulse2<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>pulse3<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>city tb<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>dotted<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>pulse1<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>pulse2<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>pulse3<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br><span class="line-number">78</span><br><span class="line-number">79</span><br><span class="line-number">80</span><br><span class="line-number">81</span><br><span class="line-number">82</span><br><span class="line-number">83</span><br><span class="line-number">84</span><br><span class="line-number">85</span><br><span class="line-number">86</span><br><span class="line-number">87</span><br><span class="line-number">88</span><br><span class="line-number">89</span><br><span class="line-number">90</span><br><span class="line-number">91</span><br><span class="line-number">92</span><br><span class="line-number">93</span><br><span class="line-number">94</span><br><span class="line-number">95</span><br><span class="line-number">96</span><br></div></div><ul><li>效果图</li></ul> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232040241-1830921926.png" alt=""></p> <h3 id="_70-动画属性-animation-timing-function"><a href="#_70-动画属性-animation-timing-function" class="header-anchor">#</a> 70 动画属性-animation-timing-function</h3> <ul><li>不止可以设置linear，easy</li> <li>设置布长steps</li></ul> <h5 id="打字机效果"><a href="#打字机效果" class="header-anchor">#</a> 打字机效果</h5> <div class="language-html line-numbers-mode"><pre class="language-html"><code>
<span class="token doctype"><span class="token punctuation">&lt;!</span><span class="token doctype-tag">DOCTYPE</span> <span class="token name">html</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>en<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>UTF-8<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>viewport<span class="token punctuation">&quot;</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>width=device-width, initial-scale=1.0<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">http-equiv</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>X-UA-Compatible<span class="token punctuation">&quot;</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>ie=edge<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">&gt;</span></span>Document<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
        <span class="token selector">div</span> <span class="token punctuation">{</span>
            <span class="token property">overflow</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
            <span class="token property">font-size</span><span class="token punctuation">:</span> 20px<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> 30px<span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> pink<span class="token punctuation">;</span>
            <span class="token comment">/* 让我们的文字强制一行内显示 */</span>
            <span class="token property">white-space</span><span class="token punctuation">:</span> nowrap<span class="token punctuation">;</span>
            <span class="token comment">/* steps 就是分几步来完成我们的动画 有了steps 就不要在写 ease 或者linear 了 */</span>
            <span class="token property">animation</span><span class="token punctuation">:</span> w 4s <span class="token function">steps</span><span class="token punctuation">(</span>10<span class="token punctuation">)</span> forwards<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token atrule"><span class="token rule">@keyframes</span> w</span> <span class="token punctuation">{</span>
            <span class="token selector">0%</span> <span class="token punctuation">{</span>
                <span class="token property">width</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
            <span class="token selector">100%</span> <span class="token punctuation">{</span>
                <span class="token property">width</span><span class="token punctuation">:</span> 200px<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    </span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>世纪佳缘我在这里等你<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br></div></div><h3 id="_71-三维坐标系"><a href="#_71-三维坐标系" class="header-anchor">#</a> 71 三维坐标系</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232039305-1706274340.png" alt=""></p> <h3 id="_72-透视"><a href="#_72-透视" class="header-anchor">#</a> 72. 透视</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232037574-1792617246.png" alt=""></p> <h3 id="_73-3d呈现"><a href="#_73-3d呈现" class="header-anchor">#</a> 73. 3D呈现</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232035866-801049934.png" alt=""></p> <ul><li>药片翻转效果</li></ul> <div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token doctype"><span class="token punctuation">&lt;!</span><span class="token doctype-tag">DOCTYPE</span> <span class="token name">html</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>en<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>UTF-8<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>viewport<span class="token punctuation">&quot;</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>width=device-width, initial-scale=1.0<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">http-equiv</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>X-UA-Compatible<span class="token punctuation">&quot;</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>ie=edge<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">&gt;</span></span>Document<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
        <span class="token selector">body</span> <span class="token punctuation">{</span>
            <span class="token property">perspective</span><span class="token punctuation">:</span> 400px<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector">.box</span> <span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> relative<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> 300px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> 300px<span class="token punctuation">;</span>
            <span class="token property">margin</span><span class="token punctuation">:</span> 100px auto<span class="token punctuation">;</span>
            <span class="token property">transition</span><span class="token punctuation">:</span> all .4s<span class="token punctuation">;</span>
            <span class="token comment">/* 让背面的紫色盒子保留立体空间 给父级添加的 */</span>
            <span class="token property">transform-style</span><span class="token punctuation">:</span> preserve-3d<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector">.box:hover</span> <span class="token punctuation">{</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>180deg<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector">.box:hover .back</span> <span class="token punctuation">{</span>
            <span class="token property">z-index</span><span class="token punctuation">:</span> 2<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector">.front,
        .back</span> <span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
            <span class="token property">top</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
            <span class="token property">left</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
            <span class="token property">border-radius</span><span class="token punctuation">:</span> 50%<span class="token punctuation">;</span>
            <span class="token property">font-size</span><span class="token punctuation">:</span> 30px<span class="token punctuation">;</span>
            <span class="token property">color</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span>
            <span class="token property">text-align</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
            <span class="token property">line-height</span><span class="token punctuation">:</span> 300px<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector">.front</span> <span class="token punctuation">{</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> pink<span class="token punctuation">;</span>
            <span class="token property">z-index</span><span class="token punctuation">:</span> 1<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector">.back</span> <span class="token punctuation">{</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> purple<span class="token punctuation">;</span>
            <span class="token comment">/* 像手机一样 背靠背 旋转 */</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>180deg<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    </span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>box<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>front<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>黑马程序员<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>back<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>pink老师这里等你<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br></div></div><p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232034880-448670251.gif" alt=""></p> <h3 id="_74-旋转木马的效果"><a href="#_74-旋转木马的效果" class="header-anchor">#</a> 74 旋转木马的效果</h3> <div class="language-html line-numbers-mode"><pre class="language-html"><code><span class="token doctype"><span class="token punctuation">&lt;!</span><span class="token doctype-tag">DOCTYPE</span> <span class="token name">html</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>en<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>UTF-8<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>viewport<span class="token punctuation">&quot;</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>width=device-width, initial-scale=1.0<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">http-equiv</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>X-UA-Compatible<span class="token punctuation">&quot;</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>ie=edge<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">&gt;</span></span>Document<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
        <span class="token selector">body</span> <span class="token punctuation">{</span>
            <span class="token property">perspective</span><span class="token punctuation">:</span> 1000px<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">section</span> <span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> relative<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> 300px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> 200px<span class="token punctuation">;</span>
            <span class="token property">margin</span><span class="token punctuation">:</span> 150px auto<span class="token punctuation">;</span>
            <span class="token property">transform-style</span><span class="token punctuation">:</span> preserve-3d<span class="token punctuation">;</span>
            <span class="token comment">/* 添加动画效果 */</span>
            <span class="token property">animation</span><span class="token punctuation">:</span> rotate 10s linear infinite<span class="token punctuation">;</span>
            <span class="token property">background</span><span class="token punctuation">:</span> <span class="token url"><span class="token function">url</span><span class="token punctuation">(</span>media/pig.jpg<span class="token punctuation">)</span></span> no-repeat<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">section:hover</span> <span class="token punctuation">{</span>
            <span class="token comment">/* 鼠标放入section 停止动画 */</span>
            <span class="token property">animation-play-state</span><span class="token punctuation">:</span> paused<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token atrule"><span class="token rule">@keyframes</span> rotate</span> <span class="token punctuation">{</span>
            <span class="token selector">0%</span> <span class="token punctuation">{</span>
                <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>0<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
            <span class="token selector">100%</span> <span class="token punctuation">{</span>
                <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>360deg<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">section div</span> <span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
            <span class="token property">top</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
            <span class="token property">left</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
            <span class="token property">background</span><span class="token punctuation">:</span> <span class="token url"><span class="token function">url</span><span class="token punctuation">(</span>media/dog.jpg<span class="token punctuation">)</span></span> no-repeat<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">section div:nth-child(1)</span> <span class="token punctuation">{</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>0<span class="token punctuation">)</span> <span class="token function">translateZ</span><span class="token punctuation">(</span>300px<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">section div:nth-child(2)</span> <span class="token punctuation">{</span>
            <span class="token comment">/* 先旋转好了再 移动距离 */</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>60deg<span class="token punctuation">)</span> <span class="token function">translateZ</span><span class="token punctuation">(</span>300px<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">section div:nth-child(3)</span> <span class="token punctuation">{</span>
            <span class="token comment">/* 先旋转好了再 移动距离 */</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>120deg<span class="token punctuation">)</span> <span class="token function">translateZ</span><span class="token punctuation">(</span>300px<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">section div:nth-child(4)</span> <span class="token punctuation">{</span>
            <span class="token comment">/* 先旋转好了再 移动距离 */</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>180deg<span class="token punctuation">)</span> <span class="token function">translateZ</span><span class="token punctuation">(</span>300px<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">section div:nth-child(5)</span> <span class="token punctuation">{</span>
            <span class="token comment">/* 先旋转好了再 移动距离 */</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>240deg<span class="token punctuation">)</span> <span class="token function">translateZ</span><span class="token punctuation">(</span>300px<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        
        <span class="token selector">section div:nth-child(6)</span> <span class="token punctuation">{</span>
            <span class="token comment">/* 先旋转好了再 移动距离 */</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">rotateY</span><span class="token punctuation">(</span>300deg<span class="token punctuation">)</span> <span class="token function">translateZ</span><span class="token punctuation">(</span>300px<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    </span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>section</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>section</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br><span class="line-number">78</span><br><span class="line-number">79</span><br><span class="line-number">80</span><br><span class="line-number">81</span><br><span class="line-number">82</span><br><span class="line-number">83</span><br><span class="line-number">84</span><br><span class="line-number">85</span><br><span class="line-number">86</span><br><span class="line-number">87</span><br><span class="line-number">88</span><br><span class="line-number">89</span><br><span class="line-number">90</span><br></div></div><ul><li>旋转好后---&gt;坐标轴发生了改变，z轴方向为旋转后的面向外</li></ul> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232032843-797150136.gif" alt=""></p> <h3 id="_75-浏览器私有前缀"><a href="#_75-浏览器私有前缀" class="header-anchor">#</a> 75.浏览器私有前缀</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232021785-1663351485.png" alt=""></p> <h3 id="_75-移动端视口"><a href="#_75-移动端视口" class="header-anchor">#</a> 75.移动端视口</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232021070-1442070240.png" alt=""></p> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232019841-1094697054.png" alt="QQ截图20230111152430"></p> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232010543-1751624632.png" alt="QQ截图20230111152501"></p> <h3 id="_76-物理像素"><a href="#_76-物理像素" class="header-anchor">#</a> 76 物理像素</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232018259-1199095149.png" alt=""></p> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232017500-438945770.png" alt=""></p> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232015913-1295650231.png" alt="QQ截图20230111153554"></p> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232014812-14565202.png" alt="QQ截图20230111153719"></p> <h3 id="_77-移动端css初始化"><a href="#_77-移动端css初始化" class="header-anchor">#</a> 77 移动端CSS初始化</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232014066-1410659036.png" alt=""></p> <h3 id="_78-移动端特殊样式"><a href="#_78-移动端特殊样式" class="header-anchor">#</a> 78 . 移动端特殊样式</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232012972-1463888921.png" alt=""></p> <ul><li>a标签点击高亮</li></ul> <h3 id="_79-移动端缩放限制"><a href="#_79-移动端缩放限制" class="header-anchor">#</a> 79.移动端缩放限制</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232011849-37032681.png" alt=""></p> <h3 id="_80-二倍精灵图"><a href="#_80-二倍精灵图" class="header-anchor">#</a> 80 二倍精灵图</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232011301-1305596095.png" alt=""></p> <h3 id="_81-flex布局注意reverse"><a href="#_81-flex布局注意reverse" class="header-anchor">#</a> 81. flex布局注意reverse</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232010543-1751624632.png" alt=""></p> <h3 id="_82-flex-侧轴上子元素对其方式-多行"><a href="#_82-flex-侧轴上子元素对其方式-多行" class="header-anchor">#</a> 82  flex-侧轴上子元素对其方式（多行）</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232009579-151538301.png" alt=""></p> <ul><li>注意是多行</li> <li>已经换行，行与行之间的排列方式</li></ul> <h3 id="_83-flex-属性连写"><a href="#_83-flex-属性连写" class="header-anchor">#</a> 83. flex-属性连写</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232008614-902639928.png" alt=""></p> <h3 id="_84-order布局子项常见属性"><a href="#_84-order布局子项常见属性" class="header-anchor">#</a> 84. order布局子项常见属性</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232007350-1340712293.png" alt=""></p> <h3 id="_85-媒体查询"><a href="#_85-媒体查询" class="header-anchor">#</a> 85 媒体查询</h3> <div class="language-css line-numbers-mode"><pre class="language-css"><code>&lt;style&gt;
        <span class="token comment">/* 1. 媒体查询一般按照从大到小或者 从小到大的顺序来 */</span>
        <span class="token comment">/* 2. 小于540px 页面的背景颜色变为蓝色 */</span>
        
        <span class="token atrule"><span class="token rule">@media</span> screen <span class="token keyword">and</span> <span class="token punctuation">(</span><span class="token property">max-width</span><span class="token punctuation">:</span> 539px<span class="token punctuation">)</span></span> <span class="token punctuation">{</span>
            <span class="token selector">body</span> <span class="token punctuation">{</span>
                <span class="token property">background-color</span><span class="token punctuation">:</span> blue<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token comment">/* 3. 540 ~ 970 我们的页面颜色改为 绿色 */</span>
        <span class="token comment">/* @media screen and (min-width: 540px) and (max-width: 969px) {
            body {
                background-color: green;
            }
        } */</span>
        
        <span class="token atrule"><span class="token rule">@media</span> screen <span class="token keyword">and</span> <span class="token punctuation">(</span><span class="token property">min-width</span><span class="token punctuation">:</span> 540px<span class="token punctuation">)</span></span> <span class="token punctuation">{</span>
            <span class="token selector">body</span> <span class="token punctuation">{</span>
                <span class="token property">background-color</span><span class="token punctuation">:</span> green<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token comment">/* 4. 大于等于970 我们页面的颜色改为 红色 */</span>
        
        <span class="token atrule"><span class="token rule">@media</span> screen <span class="token keyword">and</span> <span class="token punctuation">(</span><span class="token property">min-width</span><span class="token punctuation">:</span> 970px<span class="token punctuation">)</span></span> <span class="token punctuation">{</span>
            <span class="token selector">body</span> <span class="token punctuation">{</span>
                <span class="token property">background-color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token comment">/* 5. screen 还有 and 必须带上不能省略的 */</span>
        <span class="token comment">/* 6. 我们的数字后面必须跟单位  970px   这个 px 不能省略的 */</span>
    &lt;/style&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br></div></div><ul><li>注意
<ul><li>and关键字前后必须有空格</li></ul></li></ul> <h3 id="_86-媒体查询引入资源"><a href="#_86-媒体查询引入资源" class="header-anchor">#</a> 86.媒体查询引入资源</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232006747-784262937.png" alt=""></p> <h3 id="_87-响应式工具"><a href="#_87-响应式工具" class="header-anchor">#</a> 87. 响应式工具</h3> <p><img src="https://img2023.cnblogs.com/blog/3089561/202302/3089561-20230202232005973-1547246531.png" alt=""></p></div></div>  <div class="page-edit"><div class="edit-link"><a href="https://github.com/linxin1123/vuepress-blog/edit/master/docs/08.面试/01.蓝桥杯备战/01.html+css部分复习-cnblog.md" target="_blank" rel="noopener noreferrer">编辑</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2023/02/17, 11:29:32</span></div></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/note/xzms/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">校招零距离面试笔记</div></a> <a href="/pages/f57a40/" class="page-nav-centre page-nav-centre-next"><div class="tooltip">Dom和Bom复习-cnblog</div></a></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/note/xzms/" class="prev">校招零距离面试笔记</a></span> <span class="next"><a href="/pages/f57a40/">Dom和Bom复习-cnblog</a>→
      </span></p></div></div></div> <div class="article-list"><div class="article-title"><a href="/archives/" class="iconfont icon-bi">最近更新</a></div> <div class="article-wrapper"><dl><dd>01</dd> <dt><a href="/pages/0b785d/"><div>
            Vuex
            <!----></div></a> <span class="date">03-14</span></dt></dl><dl><dd>02</dd> <dt><a href="/pages/c59cc0/"><div>
            Vue响应式原理
            <!----></div></a> <span class="date">03-14</span></dt></dl><dl><dd>03</dd> <dt><a href="/pages/83cc7a/"><div>
            Vue虚拟DOM-cnblog
            <!----></div></a> <span class="date">03-14</span></dt></dl> <dl><dd></dd> <dt><a href="/archives/" class="more">更多文章&gt;</a></dt></dl></div></div></main></div> <div class="footer"><div class="icons"><a href="3010733382@qq.com" title="发邮件" target="_blank" class="iconfont icon-youjian"></a><a href="https://github.com/linxin1123" title="GitHub" target="_blank" class="iconfont icon-github"></a><a href="https://music.163.com/#/playlist?id=755597173" title="听音乐" target="_blank" class="iconfont icon-erji"></a></div> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2022-2023
    <span>lingxin | <a href="https://github.com/linxin1123/vuepress-blog/blob/master/LICENSE" target="_blank">MIT License</a></span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <!----></div><div class="global-ui"><div></div></div></div>
    <script src="/assets/js/app.57550e13.js" defer></script><script src="/assets/js/2.f014c35f.js" defer></script><script src="/assets/js/124.60df855c.js" defer></script>
  </body>
</html>
